-- GENERATED SPELL FOR [Sunblade Mage Guard] --


function spell0_24683(pUnit, Event) --@Glaive Throw,n/a--
pUnit:FullCastSpellOnTarget(44478,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24683', 527, 1)
end

function spell1_24683(pUnit, Event) --@Glaive Throw,n/a--
pUnit:FullCastSpellOnTarget(46028,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24683', 549, 1)
end

function spell2_24683(pUnit, Event) --@Magic Dampening Field,n/a--
pUnit:FullCastSpellOnTarget(44475,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24683', 31000, 1)
end

function Sorts_24683(pUnit, Event)
local choix_sorts_24683 = math.random(0, 2)
if choix_sorts_24683 == 0 then
pUnit:RegisterEvent('spell0_24683', 1, 1)
end
if choix_sorts_24683 == 1 then
pUnit:RegisterEvent('spell1_24683', 1, 1)
end
if choix_sorts_24683 == 2 then
pUnit:RegisterEvent('spell2_24683', 1, 1)
end
end

function mob24683_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_24683', math.random(1500, 3000), 1)
end

function mob24683_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24683_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24683_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(24683, 1, 'mob24683_Action')
RegisterUnitEvent(24683, 2, 'mob24683_Leave')
RegisterUnitEvent(24683, 3, 'mob24683_Kill')
RegisterUnitEvent(24683, 4, 'mob24683_Die')
